import { COMMUNITY_TYPE } from "./abstract-community";
import { DefaultStage } from '../default-stage';
import { AbstractCommunity, IAbstractCommunityOptions } from './abstract-community';
import { IFortressData } from "../../data/community";
import { CommunityData } from "./community-data";
import { Mesh } from "@babylonjs/core";


interface IFortressOptions extends IAbstractCommunityOptions {
}


class Fortress extends AbstractCommunity {

    constructor(stage: DefaultStage, options: IFortressOptions) {
        super(stage, options);
    }

    public get type(): COMMUNITY_TYPE {
        return COMMUNITY_TYPE.FORTRESS;
    }

    public get data(): IFortressData {
        return CommunityData.fortressData[this.dataIndex];
    }

    protected initializePickMesh(): Mesh {
        const m = super.initializePickMesh();
        m.scaling.set(0.2, 0.1, 0.2);
        m.position.y = 0.05;
        m.visibility = 0;
        return m;
    }

}


export { Fortress };
export type { IFortressOptions };